package org.hcf.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 群组
 * </p>
 *
 * @author xianiyitiao
 * @since 2024-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ChatGroup对象", description="群组")
public class ChatGroup extends Model<ChatGroup> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "group_id", type = IdType.AUTO)
    private Long groupId;

    @ApiModelProperty(value = "群外部账号(腾讯IM接口使用)")
    private String groupAccount;

    @ApiModelProperty(value = "群名")
    private String groupName;

    @ApiModelProperty(value = "公告")
    private String notice;

    @ApiModelProperty(value = "头像")
    private String portrait;

    @ApiModelProperty(value = "群主")
    private Long master;

    @ApiModelProperty(value = "是否开启邀请确认")
    private boolean isInviteConfire;

    @ApiModelProperty(value = "是否只有群主/管理员可修改群聊名称")
    private boolean isMasterChangeName;

    @ApiModelProperty(value = "是否全体禁言")
    private boolean isAllMute;

    @ApiModelProperty(value = "禁止群成员添加好友")
    private boolean isNotAdd;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "是否接收完成")
    private boolean receive;

    @ApiModelProperty(value = "是否解散")
    private boolean dispose;


    @Override
    protected Serializable pkVal() {
        return this.groupId;
    }

}
